1. Field of the invention
Aspects of the present invention relate to storage apparatuses using a non-volatile memory as a cache and methods of managing the same. More particularly, aspects of the present invention relate to storage apparatuses using non-volatile memory, which retains data even after power interruption, as a cache and methods of managing the same.
2. Description of the Prior Art
Referring to FIG. 1, a conventional storage apparatus 10 includes a host 11, a data buffer 12, and a main storage medium 13. The host 11 transmits/receives data to/from the main storage medium 13 in accordance with a user's command. The data buffer 12 buffers the difference in rate between the host 11 and the main storage medium 13.
Particularly, data transmitted from the host 11 is temporarily stored in the data buffer 12 until it is recorded in the main storage medium 13, and vice versa. The data buffer 12 of the storage apparatus 10 is generally composed of a volatile memory. This means that, when power supply to the main storage device 10 is interrupted, all data existing in the data buffer 12 is lost.
In order to increase access efficiency, the storage apparatus 10 uses a cache, which stores a part of the data that is to be stored in the main storage medium 13. When the host 11 reads data stored in the cache, access to the main storage medium 13 is unnecessary. This increases access efficiency.
However, the data buffer 12 cannot be used as a cache, even when the size of the data buffer 12 is increased, because it loses all data when the power supply is interrupted. In addition, the fact that the main storage medium 13 must be always supplied with power is an obstacle to reducing power consumption.
Therefore, it has recently been proposed to use a non-volatile memory as the cache of the storage apparatus 10 so that, when the host 11 reads/writes data from/to the non-volatile memory, power supply to the main storage medium 13 is interrupted so as to reduce the power consumption.
However, use of a non-volatile memory as the cache of the storage apparatus 10 has the following problems: data must be efficiently managed according to whether or not it is fixed. Particularly, the non-volatile memory has a fixed region, in which data is fixedly positioned all the time, and a non-fixed region in which position of data is changed frequently. These regions must be managed efficiently. In addition, a method of protecting data against unexpected power interruption is necessary. There is also a need to provide a method of collecting blocks in order to minimize the time of power supply to the main storage medium 13, as well as a method of increasing the life of the non-volatile memory in consideration of the wear level of respective physical blocks in the non-volatile memory.
Laid-open Japanese Patent No. 2003-256289 discloses a system for maintaining the consistency of wear level of a flash memory system, the address of which can be designated as desired, by periodically deleting the designation of blocks, which have been grouped in the flash memory, according to a circular sequence (recording and deletion occur at both the bottom and top of a physical sector address). However, the system disclosed in Japanese Patent No. 2003-256289 does not propose a method of efficiently managing data in fixed and non-fixed regions, nor does it suggest protecting data against unexpected power interruption, or increasing lifespan based on block collection and wear level adjustment.